<route lang="json5" type="page">
{
    style: {
        navigationBarTitleText: "一日游",
    },
}
</route>

<template>
    <view class="m-base-box m-spot px-4 py-2">
        <wd-search
            v-model="spotname"
            hide-cancel
            @search="getRedSpot"
            custom-class="u-search"
            placeholder="请输入名称"
        />
        <view class="mt-2"><flowSpot :columns="columns"></flowSpot> </view>
    </view>
</template>

<script lang="ts" setup>
import { getRedSpotUsingGet } from "@/service/app";
import flowSpot from "@/components/spotFlow.vue";
const columns = ref([]);
const spotname = ref("");
const getRedSpot = () => {
    getRedSpotUsingGet({ params: { category: 2 } }).then((res) => {
        columns.value = res?.data || [];
    });
};
onLoad(() => {
    getRedSpot();
});
onShareTimeline(() => {
    return {};
});
</script>
<style lang="scss" scoped>
.m-spot {
    :deep(.u-search) {
        background: rgba(255, 255, 255, 0);
    }
}
</style>
